<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>
  </head>
  <body>
    function类型 相对java来讲 ，及其自由， abc apply bind call

    <script>
      let a = {
        name1: "zhangsasn",
      };
      let b = function (sex, skill) {
        console.log(this.name1, "===", this.age, "====", sex, skill);
      };
      b(true, "basketball");
      b.call(a, true, "basketball");
      //  b()
      b.apply(a, [false, "football"]);
      b(true, "basketball");
      let b_enhanced = b.bind(a)
      b_enhanced(true,"basketball")

      let c = {
        name1:"wangwu",
        age:12
      }
      b.call(c,true,"football___")

      let d=[];
      // c.push("first")
      d.push.call(c,"first")
      d.push.call(c,"second")
      Array.prototype.push.call(c,"third")

    </script>
  </body>
</html>
